ORGANIC FERTILIZERS IN THE QUALITY AND POST-HARVEST MANAGEMENT OF MANGO (Mangifera indica L). VAR. KENT

1 Setup

Install development version.

if (!require("remotes"))
  install.packages("remotes")
remotes::install_github("flavjack/inti")
library(emmeans)
library(corrplot)
library(multcomp)
library(FSA)
library(factoextra)
library(corrplot)
library(png)
source('https://inkaverse.com/setup.r')

session_info()
─ Session info ───────────────────────────────────────────────────────────────
 setting  value
 version  R version 4.4.1 (2024-06-14 ucrt)
 os       Windows 11 x64 (build 22631)
 system   x86_64, mingw32
 ui       RTerm
 language (EN)
 collate  Spanish_Peru.utf8
 ctype    Spanish_Peru.utf8
 tz       America/Lima
 date     2024-08-27
 pandoc   3.1.11 @ C:/Program Files/RStudio/resources/app/bin/quarto/bin/tools/ (via rmarkdown)

─ Packages ───────────────────────────────────────────────────────────────────
 package       * version  date (UTC) lib source
 agricolae       1.3-7    2023-10-22 [1] CRAN (R 4.4.0)
 AlgDesign       1.2.1    2022-05-25 [1] CRAN (R 4.4.0)
 askpass         1.2.0    2023-09-03 [1] CRAN (R 4.4.0)
 boot            1.3-30   2024-02-26 [2] CRAN (R 4.4.1)
 cachem          1.1.0    2024-05-16 [1] CRAN (R 4.4.0)
 cellranger      1.1.0    2016-07-27 [1] CRAN (R 4.4.0)
 cli             3.6.2    2023-12-11 [1] CRAN (R 4.4.0)
 cluster         2.1.6    2023-12-01 [2] CRAN (R 4.4.1)
 coda            0.19-4.1 2024-01-31 [1] CRAN (R 4.4.0)
 codetools       0.2-20   2024-03-31 [2] CRAN (R 4.4.1)
 colorspace      2.1-0    2023-01-23 [1] CRAN (R 4.4.0)
 corrplot      * 0.92     2021-11-18 [1] CRAN (R 4.4.0)
 cowplot       * 1.1.3    2024-01-22 [1] CRAN (R 4.4.0)
 curl            5.2.1    2024-03-01 [1] CRAN (R 4.4.0)
 devtools      * 2.4.5    2022-10-11 [1] CRAN (R 4.4.0)
 digest          0.6.35   2024-03-11 [1] CRAN (R 4.4.0)
 dplyr         * 1.1.4    2023-11-17 [1] CRAN (R 4.4.0)
 DT              0.33     2024-04-04 [1] CRAN (R 4.4.0)
 ellipsis        0.3.2    2021-04-29 [1] CRAN (R 4.4.0)
 emmeans       * 1.10.2   2024-05-20 [1] CRAN (R 4.4.0)
 estimability    1.5.1    2024-05-12 [1] CRAN (R 4.4.0)
 evaluate        0.23     2023-11-01 [1] CRAN (R 4.4.0)
 factoextra    * 1.0.7    2020-04-01 [1] CRAN (R 4.4.0)
 FactoMineR    * 2.11     2024-04-20 [1] CRAN (R 4.4.0)
 fansi           1.0.6    2023-12-08 [1] CRAN (R 4.4.0)
 fastmap         1.2.0    2024-05-15 [1] CRAN (R 4.4.0)
 flashClust      1.01-2   2012-08-21 [1] CRAN (R 4.4.0)
 forcats       * 1.0.0    2023-01-29 [1] CRAN (R 4.4.0)
 fs              1.6.4    2024-04-25 [1] CRAN (R 4.4.0)
 FSA           * 0.9.5    2023-08-26 [1] CRAN (R 4.4.0)
 gargle          1.5.2    2023-07-20 [1] CRAN (R 4.4.0)
 generics        0.1.3    2022-07-05 [1] CRAN (R 4.4.0)
 ggplot2       * 3.5.1    2024-04-23 [1] CRAN (R 4.4.0)
 ggrepel         0.9.5    2024-01-10 [1] CRAN (R 4.4.0)
 glue            1.7.0    2024-01-09 [1] CRAN (R 4.4.0)
 googledrive   * 2.1.1    2023-06-11 [1] CRAN (R 4.4.0)
 googlesheets4 * 1.1.1    2023-06-11 [1] CRAN (R 4.4.0)
 gsheet        * 0.4.5    2020-04-07 [1] CRAN (R 4.4.0)
 gtable          0.3.5    2024-04-22 [1] CRAN (R 4.4.0)
 hms             1.1.3    2023-03-21 [1] CRAN (R 4.4.0)
 htmltools       0.5.8.1  2024-04-04 [1] CRAN (R 4.4.0)
 htmlwidgets     1.6.4    2023-12-06 [1] CRAN (R 4.4.0)
 httpuv          1.6.15   2024-03-26 [1] CRAN (R 4.4.0)
 httr            1.4.7    2023-08-15 [1] CRAN (R 4.4.0)
 huito         * 0.2.4    2023-10-25 [1] CRAN (R 4.4.0)
 inti          * 0.6.5    2024-08-02 [1] Github (flavjack/inti@38be898)
 jsonlite        1.8.8    2023-12-04 [1] CRAN (R 4.4.0)
 knitr         * 1.46     2024-04-06 [1] CRAN (R 4.4.0)
 later           1.3.2    2023-12-06 [1] CRAN (R 4.4.0)
 lattice         0.22-6   2024-03-20 [2] CRAN (R 4.4.1)
 leaps           3.1      2020-01-16 [1] CRAN (R 4.4.0)
 lifecycle       1.0.4    2023-11-07 [1] CRAN (R 4.4.0)
 lme4            1.1-35.3 2024-04-16 [1] CRAN (R 4.4.0)
 lubridate     * 1.9.3    2023-09-27 [1] CRAN (R 4.4.0)
 magick        * 2.8.3    2024-02-18 [1] CRAN (R 4.4.0)
 magrittr        2.0.3    2022-03-30 [1] CRAN (R 4.4.0)
 MASS          * 7.3-60.2 2024-04-26 [2] CRAN (R 4.4.1)
 Matrix          1.7-0    2024-04-26 [2] CRAN (R 4.4.1)
 memoise         2.0.1    2021-11-26 [1] CRAN (R 4.4.0)
 mime            0.12     2021-09-28 [1] CRAN (R 4.4.0)
 miniUI          0.1.1.1  2018-05-18 [1] CRAN (R 4.4.0)
 minqa           1.2.7    2024-05-20 [1] CRAN (R 4.4.0)
 mnormt          2.1.1    2022-09-26 [1] CRAN (R 4.4.0)
 multcomp      * 1.4-25   2023-06-20 [1] CRAN (R 4.4.0)
 multcompView    0.1-10   2024-03-08 [1] CRAN (R 4.4.0)
 munsell         0.5.1    2024-04-01 [1] CRAN (R 4.4.0)
 mvtnorm       * 1.2-5    2024-05-21 [1] CRAN (R 4.4.0)
 nlme            3.1-164  2023-11-27 [2] CRAN (R 4.4.1)
 nloptr          2.0.3    2022-05-26 [1] CRAN (R 4.4.0)
 openssl         2.2.0    2024-05-16 [1] CRAN (R 4.4.0)
 pillar          1.9.0    2023-03-22 [1] CRAN (R 4.4.0)
 pkgbuild        1.4.4    2024-03-17 [1] CRAN (R 4.4.0)
 pkgconfig       2.0.3    2019-09-22 [1] CRAN (R 4.4.0)
 pkgload         1.3.4    2024-01-16 [1] CRAN (R 4.4.0)
 png           * 0.1-8    2022-11-29 [1] CRAN (R 4.4.0)
 profvis         0.3.8    2023-05-02 [1] CRAN (R 4.4.0)
 promises        1.3.0    2024-04-05 [1] CRAN (R 4.4.0)
 psych         * 2.4.3    2024-03-18 [1] CRAN (R 4.4.0)
 purrr         * 1.0.2    2023-08-10 [1] CRAN (R 4.4.0)
 R6              2.5.1    2021-08-19 [1] CRAN (R 4.4.0)
 rappdirs        0.3.3    2021-01-31 [1] CRAN (R 4.4.0)
 Rcpp            1.0.12   2024-01-09 [1] CRAN (R 4.4.0)
 readr         * 2.1.5    2024-01-10 [1] CRAN (R 4.4.0)
 remotes         2.5.0    2024-03-17 [1] CRAN (R 4.4.0)
 rlang           1.1.3    2024-01-10 [1] CRAN (R 4.4.0)
 rmarkdown       2.27     2024-05-17 [1] CRAN (R 4.4.0)
 rstudioapi      0.16.0   2024-03-24 [1] CRAN (R 4.4.0)
 sandwich        3.1-0    2023-12-11 [1] CRAN (R 4.4.0)
 scales          1.3.0    2023-11-28 [1] CRAN (R 4.4.0)
 scatterplot3d   0.3-44   2023-05-05 [1] CRAN (R 4.4.0)
 sessioninfo     1.2.2    2021-12-06 [1] CRAN (R 4.4.0)
 shiny         * 1.8.1.1  2024-04-02 [1] CRAN (R 4.4.0)
 showtext        0.9-7    2024-03-02 [1] CRAN (R 4.4.0)
 showtextdb      3.0      2020-06-04 [1] CRAN (R 4.4.0)
 stringi         1.8.4    2024-05-06 [1] CRAN (R 4.4.0)
 stringr       * 1.5.1    2023-11-14 [1] CRAN (R 4.4.0)
 survival      * 3.6-4    2024-04-24 [2] CRAN (R 4.4.1)
 sysfonts        0.8.9    2024-03-02 [1] CRAN (R 4.4.0)
 TH.data       * 1.1-2    2023-04-17 [1] CRAN (R 4.4.0)
 tibble        * 3.2.1    2023-03-20 [1] CRAN (R 4.4.0)
 tidyr         * 1.3.1    2024-01-24 [1] CRAN (R 4.4.0)
 tidyselect      1.2.1    2024-03-11 [1] CRAN (R 4.4.0)
 tidyverse     * 2.0.0    2023-02-22 [1] CRAN (R 4.4.0)
 timechange      0.3.0    2024-01-18 [1] CRAN (R 4.4.0)
 tzdb            0.4.0    2023-05-12 [1] CRAN (R 4.4.0)
 urlchecker      1.0.1    2021-11-30 [1] CRAN (R 4.4.0)
 usethis       * 2.2.3    2024-02-19 [1] CRAN (R 4.4.0)
 utf8            1.2.4    2023-10-22 [1] CRAN (R 4.4.0)
 vctrs           0.6.5    2023-12-01 [1] CRAN (R 4.4.0)
 withr           3.0.0    2024-01-16 [1] CRAN (R 4.4.0)
 xfun            0.44     2024-05-15 [1] CRAN (R 4.4.0)
 xtable          1.8-4    2019-04-21 [1] CRAN (R 4.4.0)
 yaml            2.3.8    2023-12-11 [1] CRAN (R 4.4.0)
 zoo             1.8-12   2023-04-13 [1] CRAN (R 4.4.0)

 [1] C:/Users/INIA/AppData/Local/R/win-library/4.4
 [2] C:/Program Files/R/R-4.4.1/library

──────────────────────────────────────────────────────────────────────────────

2 Import data

Data from the variables evaluated in 2023 during the 2022-2023 growing season. The evaluations focused on mango fruits of the ‘Kent’ variety at two stages: physiological maturity and commercial maturity.

url <- "https://docs.google.com/spreadsheets/d/1cjWrS-EVcII85c-l_NuEfTpjhVMI156e8REM9GDVP_w/edit?gid=95386135#gid=95386135"

gs <- url %>% 
  as_sheets_id()

tratamiento <- gs %>% 
  range_read("tratamientos") %>% 
  rename_with(~ tolower(.))

rendimiento <- gs %>% 
  range_read("rendimiento") %>% 
  rename_with(~ tolower(.)) 

fisio <- gs %>% 
  range_read("fisio") %>% 
  rename_with(~ tolower(.)) %>% 
  merge(., tratamiento) %>% 
  dplyr::select(tratamiento,compost, biol,everything()) %>% 
  merge(., rendimiento) %>% 
  mutate(across(tratamiento:nfrutos, ~ as.factor(.))) %>% 
  rename(treat = tratamiento
         , repetition = repeticion
         , composts = compost)

str(fisio)
## 'data.frame':    405 obs. of  15 variables:
##  $ treat     : Factor w/ 9 levels "T0","T1","T2",..: 1 1 1 1 1 1 1 1 1 1 ...
##  $ repetition: Factor w/ 3 levels "1","2","3": 1 1 1 1 1 1 1 1 1 1 ...
##  $ nplantas  : Factor w/ 3 levels "1","2","3": 1 1 1 1 1 2 2 2 2 2 ...
##  $ composts  : Factor w/ 3 levels "0","5","15": 1 1 1 1 1 1 1 1 1 1 ...
##  $ biol      : Factor w/ 3 levels "0","5","10": 1 1 1 1 1 1 1 1 1 1 ...
##  $ nfrutos   : Factor w/ 5 levels "1","2","3","4",..: 1 2 3 4 5 1 2 3 4 5 ...
##  $ pcfmf     : num  90 70 60 40 70 70 40 60 30 80 ...
##  $ ffmf      : num  13.2 12 10 10.2 12.8 11.6 10.8 11.9 11 11.2 ...
##  $ cifmf     : num  2 2 2 2 2 1.5 2 2 2.5 2.5 ...
##  $ ssfmf     : num  8.8 8.6 8.5 8.2 8.6 9.8 9.7 9.4 9.2 8.5 ...
##  $ phfmf     : num  2.6 2.55 2.52 2.58 2.55 ...
##  $ atfmf     : num  1.39 1.38 1.2 1.12 1.35 1.49 1.29 1.52 1.54 1.42 ...
##  $ msfmf     : num  19.1 19.1 19.1 19.1 19.1 ...
##  $ imf       : num  6.33 6.23 7.08 7.32 6.37 6.58 7.52 6.18 5.97 5.99 ...
##  $ rpp       : num  51.3 51.3 51.3 51.3 51.3 52.4 52.4 52.4 52.4 52.4 ...

consumo <- gs %>% 
  range_read("consumo") %>% 
  rename_with(~ tolower(.)) %>%
  merge(., tratamiento) %>% 
  dplyr::select(tratamiento,compost, biol,everything()) %>% 
  mutate(across(tratamiento:nfrutos, ~ as.factor(.))) %>% 
    rename(treat = tratamiento
         , repetition = repeticion
         , composts = compost
         , n_fruits = nfrutos)

glimpse(consumo)
## Rows: 135
## Columns: 12
## $ treat      <fct> T0, T0, T0, T0, T0, T0, T0, T0, T0, T0, T0, T0, T0, T0, T0,…
## $ composts   <fct> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5,…
## $ biol       <fct> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,…
## $ repetition <fct> 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 1, 1, 1, 1, 1,…
## $ n_fruits   <fct> 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5,…
## $ pdfmc      <dbl> 6.68, 6.78, 7.02, 6.78, 6.12, 6.62, 6.91, 7.04, 6.45, 6.50,…
## $ ffmc       <dbl> 3.0, 3.0, 4.0, 3.8, 4.2, 4.0, 3.6, 3.0, 3.0, 3.0, 3.0, 3.4,…
## $ cifmc      <dbl> 3.0, 3.0, 3.0, 3.0, 3.0, 3.0, 3.5, 3.0, 3.0, 3.0, 3.5, 3.0,…
## $ ssfmc      <dbl> 14.6, 15.6, 14.8, 15.0, 14.0, 14.4, 15.5, 15.1, 15.2, 15.2,…
## $ phfmc      <dbl> 4.22, 4.19, 4.21, 4.15, 4.26, 4.34, 4.35, 4.34, 4.30, 4.38,…
## $ atfmc      <dbl> 0.600, 0.700, 0.700, 0.500, 0.500, 0.605, 0.615, 0.625, 0.6…
## $ imf        <dbl> 24.33333, 22.28571, 21.14286, 30.00000, 28.00000, 23.80165,…

3 Data summary

Summary of the number of data points recorded for each treatment and evaluated variable.

sm <- fisio %>% 
  group_by(treat) %>% 
  summarise(across(pcfmf:rpp, ~ sum(!is.na(.))))

sm
## # A tibble: 9 × 10
##   treat pcfmf  ffmf cifmf ssfmf phfmf atfmf msfmf   imf   rpp
##   <fct> <int> <int> <int> <int> <int> <int> <int> <int> <int>
## 1 T0       45    45    45    45    45    45    45    45    45
## 2 T1       45    45    45    45    45    45    45    45    45
## 3 T2       45    45    45    45    45    45    45    45    45
## 4 T3       45    45    45    45    45    45    45    45    45
## 5 T4       45    45    45    45    45    45    45    45    45
## 6 T5       45    45    45    45    45    45    45    45    45
## 7 T6       45    45    45    45    45    45    45    45    45
## 8 T7       45    45    45    45    45    45    45    45    45
## 9 T8       45    45    45    45    45    45    45    45    45

sm <- consumo %>% 
  group_by(treat) %>% 
  summarise(across(pdfmc:imf, ~ sum(!is.na(.))))

sm
## # A tibble: 9 × 8
##   treat pdfmc  ffmc cifmc ssfmc phfmc atfmc   imf
##   <fct> <int> <int> <int> <int> <int> <int> <int>
## 1 T0       15    15    15    15    15    15    15
## 2 T1       15    15    15    15    15    15    15
## 3 T2       15    15    15    15    15    15    15
## 4 T3       15    15    15    15    15    15    15
## 5 T4       15    15    15    15    15    15    15
## 6 T5       15    15    15    15    15    15    15
## 7 T6       15    15    15    15    15    15    15
## 8 T7       15    15    15    15    15    15    15
## 9 T8       15    15    15    15    15    15    15

4 Objetives

The objective of this study is to demonstrate the effect of organic fertilizers, specifically compost and biol, applied at the soil and foliar levels on the quality of mango fruit at physiological and commercial maturity.

4.1 Specific Objective 1

Demonstrate the effect of organic fertilizers, specifically compost and biol, applied at the soil and foliar levels on the quality of mango fruit at physiological maturity.

4.1.1 Fruit firmness at physiological maturity (FFPM)

trait <- "ffmf"
fb <- fisio

lmm <- paste({{trait}}, "~ 1 + (1|repetition) + composts*biol") %>% as.formula()

lmd <- paste({{trait}}, "~ composts*biol") %>% as.formula()

rmout <- fb %>% 
  remove_outliers(formula = lmm
                  , drop_na = T, plot_diag = T)

rmout$diagplot


rmout$outliers
##  [1] index       repetition  composts    biol        ffmf        resi       
##  [7] res_MAD     rawp.BHStud adjp        bholm       out_flag   
## <0 rows> (o 0- extensión row.names)

model <- rmout$data$clean %>% 
  aov(formula = lmd, .)

anova(model)
## Analysis of Variance Table
## 
## Response: ffmf
##                Df  Sum Sq Mean Sq F value             Pr(>F)    
## composts        2  29.954 14.9771 19.6376 0.0000000073854003 ***
## biol            2  48.734 24.3670 31.9495 0.0000000000001369 ***
## composts:biol   4   1.737  0.4344  0.5695             0.6849    
## Residuals     396 302.018  0.7627                               
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

mc <- emmeans(model, ~ biol|composts) %>%
  cld(Letters = letters, reversed = T) %>%
  mutate(across(.group, trimws)) %>% 
  rename(group = ".group")

mc %>% kable()
biol composts emmean SE df lower.CL upper.CL group
10 0 12.22000 0.1301854 396 11.96406 12.47594 a
5 0 11.80444 0.1301854 396 11.54850 12.06039 ab
0 0 11.38667 0.1301854 396 11.13073 11.64261 b
10 5 12.20444 0.1301854 396 11.94850 12.46039 a
5 5 11.94667 0.1301854 396 11.69073 12.20261 a
0 5 11.49333 0.1301854 396 11.23739 11.74927 b
10 15 12.96000 0.1301854 396 12.70406 13.21594 a
5 15 12.33111 0.1301854 396 12.07517 12.58705 b
0 15 11.95556 0.1301854 396 11.69961 12.21150 b

p1a <- mc %>% 
  plot_smr(x = "composts"
           , y = "emmean"
           , group = "biol"
           , sig = "group"
           , error = "SE"
           , color = T
           , xlab = "Composts"
           , ylab = "Fruit firmness at physiological maturity (kgf.cm^{-2})"
           , glab = "Biol"
           , ylimits = c(0, 16, 4)
           )

p1a

4.1.2 Internal fruit color at physiological maturity (IFCPM)

trait <- "cifmf"
fb <- fisio

lmm <- paste({{trait}}, "~ 1 + (1|repetition) + composts*biol") %>% as.formula()

lmd <- paste({{trait}}, "~ composts*biol") %>% as.formula()

rmout <- fb %>% 
  remove_outliers(formula = lmm
                  , drop_na = T, plot_diag = T)

rmout$diagplot


rmout$outliers
##     index repetition composts biol cifmf       resi    res_MAD
## 6       6          1        0    0   1.5 -0.6599549 -13.354004
## 9       9          1        0    0   2.5  0.3400451   6.880719
## 10     10          1        0    0   2.5  0.3400451   6.880719
## 11     11          1        0    0   2.5  0.3400451   6.880719
## 18     18          2        0    0   2.5  0.3400451   6.880719
## 21     21          2        0    0   2.5  0.3400451   6.880719
## 23     23          2        0    0   2.5  0.3400451   6.880719
## 24     24          2        0    0   2.5  0.3400451   6.880719
## 25     25          2        0    0   2.5  0.3400451   6.880719
## 26     26          2        0    0   2.5  0.3400451   6.880719
## 27     27          2        0    0   2.5  0.3400451   6.880719
## 28     28          2        0    0   2.5  0.3400451   6.880719
## 34     34          3        0    0   1.5 -0.6800902 -13.761438
## 36     36          3        0    0   3.0  0.8199098  16.590647
## 37     37          3        0    0   2.5  0.3199098   6.473285
## 38     38          3        0    0   2.5  0.3199098   6.473285
## 40     40          3        0    0   3.0  0.8199098  16.590647
## 52     52          1        5    0   2.5  0.3733785   7.555210
## 54     54          1        5    0   2.5  0.3733785   7.555210
## 55     55          1        5    0   2.5  0.3733785   7.555210
## 67     67          2        5    0   1.5 -0.6266215 -12.679513
## 68     68          2        5    0   2.5  0.3733785   7.555210
## 69     69          2        5    0   1.0 -1.1266215 -22.796875
## 70     70          2        5    0   2.5  0.3733785   7.555210
## 72     72          2        5    0   2.5  0.3733785   7.555210
## 76     76          3        5    0   2.5  0.3532431   7.147776
## 81     81          3        5    0   2.5  0.3532431   7.147776
## 83     83          3        5    0   2.5  0.3532431   7.147776
## 84     84          3        5    0   2.5  0.3532431   7.147776
## 85     85          3        5    0   2.5  0.3532431   7.147776
## 86     86          3        5    0   2.5  0.3532431   7.147776
## 87     87          3        5    0   2.5  0.3532431   7.147776
## 89     89          3        5    0   2.5  0.3532431   7.147776
## 90     90          3        5    0   2.5  0.3532431   7.147776
## 94     94          1       15    0   2.5  0.3733785   7.555210
## 96     96          1       15    0   2.5  0.3733785   7.555210
## 103   103          1       15    0   2.5  0.3733785   7.555210
## 104   104          1       15    0   2.5  0.3733785   7.555210
## 105   105          1       15    0   2.5  0.3733785   7.555210
## 108   108          2       15    0   2.5  0.3733785   7.555210
## 111   111          2       15    0   1.5 -0.6266215 -12.679513
## 116   116          2       15    0   2.5  0.3733785   7.555210
## 119   119          2       15    0   2.5  0.3733785   7.555210
## 124   124          3       15    0   2.5  0.3532431   7.147776
## 126   126          3       15    0   2.5  0.3532431   7.147776
## 129   129          3       15    0   2.5  0.3532431   7.147776
## 134   134          3       15    0   2.5  0.3532431   7.147776
## 135   135          3       15    0   2.5  0.3532431   7.147776
## 141   141          1        0    5   2.5  0.3400451   6.880719
## 142   142          1        0    5   2.5  0.3400451   6.880719
## 144   144          1        0    5   2.5  0.3400451   6.880719
## 146   146          1        0    5   2.5  0.3400451   6.880719
## 147   147          1        0    5   2.5  0.3400451   6.880719
## 156   156          2        0    5   2.5  0.3400451   6.880719
## 158   158          2        0    5   2.5  0.3400451   6.880719
## 160   160          2        0    5   2.5  0.3400451   6.880719
## 162   162          2        0    5   2.5  0.3400451   6.880719
## 163   163          2        0    5   2.5  0.3400451   6.880719
## 171   171          3        0    5   3.0  0.8199098  16.590647
## 175   175          3        0    5   2.5  0.3199098   6.473285
## 176   176          3        0    5   2.5  0.3199098   6.473285
## 177   177          3        0    5   2.5  0.3199098   6.473285
## 183   183          1        0   10   2.5  0.3733785   7.555210
## 185   185          1        0   10   2.5  0.3733785   7.555210
## 186   186          1        0   10   2.5  0.3733785   7.555210
## 189   189          1        0   10   2.5  0.3733785   7.555210
## 191   191          1        0   10   2.5  0.3733785   7.555210
## 192   192          1        0   10   2.5  0.3733785   7.555210
## 195   195          1        0   10   2.5  0.3733785   7.555210
## 204   204          2        0   10   2.5  0.3733785   7.555210
## 206   206          2        0   10   2.5  0.3733785   7.555210
## 208   208          2        0   10   1.5 -0.6266215 -12.679513
## 213   213          3        0   10   2.5  0.3532431   7.147776
## 223   223          3        0   10   3.0  0.8532431  17.265137
## 225   225          3        0   10   2.5  0.3532431   7.147776
## 231   231          1        5    5   2.5  0.3733785   7.555210
## 234   234          1        5    5   2.5  0.3733785   7.555210
## 235   235          1        5    5   2.5  0.3733785   7.555210
## 236   236          1        5    5   2.5  0.3733785   7.555210
## 243   243          2        5    5   2.5  0.3733785   7.555210
## 244   244          2        5    5   2.5  0.3733785   7.555210
## 246   246          2        5    5   2.5  0.3733785   7.555210
## 248   248          2        5    5   2.5  0.3733785   7.555210
## 250   250          2        5    5   2.5  0.3733785   7.555210
## 253   253          2        5    5   2.5  0.3733785   7.555210
## 255   255          2        5    5   2.5  0.3733785   7.555210
## 257   257          3        5    5   2.5  0.3532431   7.147776
## 269   269          3        5    5   1.5 -0.6467569 -13.086947
## 270   270          3        5    5   2.5  0.3532431   7.147776
## 281   281          1        5   10   2.5  0.3956007   8.004870
## 282   282          1        5   10   2.5  0.3956007   8.004870
## 285   285          1        5   10   2.5  0.3956007   8.004870
## 296   296          2        5   10   2.5  0.3956007   8.004870
## 298   298          2        5   10   2.5  0.3956007   8.004870
## 300   300          2        5   10   2.5  0.3956007   8.004870
## 301   301          3        5   10   2.5  0.3754653   7.597437
## 305   305          3        5   10   2.5  0.3754653   7.597437
## 310   310          3        5   10   2.5  0.3754653   7.597437
## 311   311          3        5   10   2.5  0.3754653   7.597437
## 316   316          1       15    5   2.5  0.3511562   7.105549
## 321   321          1       15    5   2.5  0.3511562   7.105549
## 325   325          1       15    5   2.5  0.3511562   7.105549
## 329   329          1       15    5   2.5  0.3511562   7.105549
## 332   332          2       15    5   2.5  0.3511562   7.105549
## 336   336          2       15    5   2.5  0.3511562   7.105549
## 338   338          2       15    5   2.5  0.3511562   7.105549
## 342   342          2       15    5   2.5  0.3511562   7.105549
## 346   346          3       15    5   3.0  0.8310209  16.815477
## 348   348          3       15    5   3.0  0.8310209  16.815477
## 354   354          3       15    5   2.5  0.3310209   6.698116
## 358   358          3       15    5   2.5  0.3310209   6.698116
## 362   362          1       15   10   2.0 -0.4821771  -9.756720
## 368   368          1       15   10   2.0 -0.4821771  -9.756720
## 374   374          1       15   10   2.0 -0.4821771  -9.756720
## 375   375          1       15   10   2.0 -0.4821771  -9.756720
## 379   379          2       15   10   3.0  0.5178229  10.478003
## 387   387          2       15   10   2.0 -0.4821771  -9.756720
## 388   388          2       15   10   2.0 -0.4821771  -9.756720
## 391   391          3       15   10   3.0  0.4976875  10.070569
## 393   393          3       15   10   3.0  0.4976875  10.070569
## 395   395          3       15   10   3.0  0.4976875  10.070569
## 398   398          3       15   10   3.0  0.4976875  10.070569
## 399   399          3       15   10   2.0 -0.5023125 -10.164153
## 402   402          3       15   10   2.0 -0.5023125 -10.164153
## 403   403          3       15   10   3.0  0.4976875  10.070569
## 405   405          3       15   10   3.0  0.4976875  10.070569
##                 rawp.BHStud                    adjp                 bholm
## 6   0.000000000000000000000 0.000000000000000000000 0.0000000000000000000
## 9   0.000000000005955236304 0.000000000005955236304 0.0000000018282575454
## 10  0.000000000005955236304 0.000000000005955236304 0.0000000018282575454
## 11  0.000000000005955236304 0.000000000005955236304 0.0000000018282575454
## 18  0.000000000005955236304 0.000000000005955236304 0.0000000018282575454
## 21  0.000000000005955236304 0.000000000005955236304 0.0000000018282575454
## 23  0.000000000005955236304 0.000000000005955236304 0.0000000018282575454
## 24  0.000000000005955236304 0.000000000005955236304 0.0000000018282575454
## 25  0.000000000005955236304 0.000000000005955236304 0.0000000018282575454
## 26  0.000000000005955236304 0.000000000005955236304 0.0000000018282575454
## 27  0.000000000005955236304 0.000000000005955236304 0.0000000018282575454
## 28  0.000000000005955236304 0.000000000005955236304 0.0000000018282575454
## 34  0.000000000000000000000 0.000000000000000000000 0.0000000000000000000
## 36  0.000000000000000000000 0.000000000000000000000 0.0000000000000000000
## 37  0.000000000095894625574 0.000000000095894625574 0.0000000272340736629
## 38  0.000000000095894625574 0.000000000095894625574 0.0000000272340736629
## 40  0.000000000000000000000 0.000000000000000000000 0.0000000000000000000
## 52  0.000000000000041744386 0.000000000000041744386 0.0000000000153201896
## 54  0.000000000000041744386 0.000000000000041744386 0.0000000000153201896
## 55  0.000000000000041744386 0.000000000000041744386 0.0000000000153201896
## 67  0.000000000000000000000 0.000000000000000000000 0.0000000000000000000
## 68  0.000000000000041744386 0.000000000000041744386 0.0000000000153201896
## 69  0.000000000000000000000 0.000000000000000000000 0.0000000000000000000
## 70  0.000000000000041744386 0.000000000000041744386 0.0000000000153201896
## 72  0.000000000000041744386 0.000000000000041744386 0.0000000000153201896
## 76  0.000000000000881961171 0.000000000000881961171 0.0000000002936930699
## 81  0.000000000000881961171 0.000000000000881961171 0.0000000002936930699
## 83  0.000000000000881961171 0.000000000000881961171 0.0000000002936930699
## 84  0.000000000000881961171 0.000000000000881961171 0.0000000002936930699
## 85  0.000000000000881961171 0.000000000000881961171 0.0000000002936930699
## 86  0.000000000000881961171 0.000000000000881961171 0.0000000002936930699
## 87  0.000000000000881961171 0.000000000000881961171 0.0000000002936930699
## 89  0.000000000000881961171 0.000000000000881961171 0.0000000002936930699
## 90  0.000000000000881961171 0.000000000000881961171 0.0000000002936930699
## 94  0.000000000000041744386 0.000000000000041744386 0.0000000000153201896
## 96  0.000000000000041744386 0.000000000000041744386 0.0000000000153201896
## 103 0.000000000000041744386 0.000000000000041744386 0.0000000000153201896
## 104 0.000000000000041744386 0.000000000000041744386 0.0000000000153201896
## 105 0.000000000000041744386 0.000000000000041744386 0.0000000000153201896
## 108 0.000000000000041744386 0.000000000000041744386 0.0000000000153201896
## 111 0.000000000000000000000 0.000000000000000000000 0.0000000000000000000
## 116 0.000000000000041744386 0.000000000000041744386 0.0000000000153201896
## 119 0.000000000000041744386 0.000000000000041744386 0.0000000000153201896
## 124 0.000000000000881961171 0.000000000000881961171 0.0000000002936930699
## 126 0.000000000000881961171 0.000000000000881961171 0.0000000002936930699
## 129 0.000000000000881961171 0.000000000000881961171 0.0000000002936930699
## 134 0.000000000000881961171 0.000000000000881961171 0.0000000002936930699
## 135 0.000000000000881961171 0.000000000000881961171 0.0000000002936930699
## 141 0.000000000005955236304 0.000000000005955236304 0.0000000018282575454
## 142 0.000000000005955236304 0.000000000005955236304 0.0000000018282575454
## 144 0.000000000005955236304 0.000000000005955236304 0.0000000018282575454
## 146 0.000000000005955236304 0.000000000005955236304 0.0000000018282575454
## 147 0.000000000005955236304 0.000000000005955236304 0.0000000018282575454
## 156 0.000000000005955236304 0.000000000005955236304 0.0000000018282575454
## 158 0.000000000005955236304 0.000000000005955236304 0.0000000018282575454
## 160 0.000000000005955236304 0.000000000005955236304 0.0000000018282575454
## 162 0.000000000005955236304 0.000000000005955236304 0.0000000018282575454
## 163 0.000000000005955236304 0.000000000005955236304 0.0000000018282575454
## 171 0.000000000000000000000 0.000000000000000000000 0.0000000000000000000
## 175 0.000000000095894625574 0.000000000095894625574 0.0000000272340736629
## 176 0.000000000095894625574 0.000000000095894625574 0.0000000272340736629
## 177 0.000000000095894625574 0.000000000095894625574 0.0000000272340736629
## 183 0.000000000000041744386 0.000000000000041744386 0.0000000000153201896
## 185 0.000000000000041744386 0.000000000000041744386 0.0000000000153201896
## 186 0.000000000000041744386 0.000000000000041744386 0.0000000000153201896
## 189 0.000000000000041744386 0.000000000000041744386 0.0000000000153201896
## 191 0.000000000000041744386 0.000000000000041744386 0.0000000000153201896
## 192 0.000000000000041744386 0.000000000000041744386 0.0000000000153201896
## 195 0.000000000000041744386 0.000000000000041744386 0.0000000000153201896
## 204 0.000000000000041744386 0.000000000000041744386 0.0000000000153201896
## 206 0.000000000000041744386 0.000000000000041744386 0.0000000000153201896
## 208 0.000000000000000000000 0.000000000000000000000 0.0000000000000000000
## 213 0.000000000000881961171 0.000000000000881961171 0.0000000002936930699
## 223 0.000000000000000000000 0.000000000000000000000 0.0000000000000000000
## 225 0.000000000000881961171 0.000000000000881961171 0.0000000002936930699
## 231 0.000000000000041744386 0.000000000000041744386 0.0000000000153201896
## 234 0.000000000000041744386 0.000000000000041744386 0.0000000000153201896
## 235 0.000000000000041744386 0.000000000000041744386 0.0000000000153201896
## 236 0.000000000000041744386 0.000000000000041744386 0.0000000000153201896
## 243 0.000000000000041744386 0.000000000000041744386 0.0000000000153201896
## 244 0.000000000000041744386 0.000000000000041744386 0.0000000000153201896
## 246 0.000000000000041744386 0.000000000000041744386 0.0000000000153201896
## 248 0.000000000000041744386 0.000000000000041744386 0.0000000000153201896
## 250 0.000000000000041744386 0.000000000000041744386 0.0000000000153201896
## 253 0.000000000000041744386 0.000000000000041744386 0.0000000000153201896
## 255 0.000000000000041744386 0.000000000000041744386 0.0000000000153201896
## 257 0.000000000000881961171 0.000000000000881961171 0.0000000002936930699
## 269 0.000000000000000000000 0.000000000000000000000 0.0000000000000000000
## 270 0.000000000000881961171 0.000000000000881961171 0.0000000002936930699
## 281 0.000000000000001110223 0.000000000000001110223 0.0000000000004185541
## 282 0.000000000000001110223 0.000000000000001110223 0.0000000000004185541
## 285 0.000000000000001110223 0.000000000000001110223 0.0000000000004185541
## 296 0.000000000000001110223 0.000000000000001110223 0.0000000000004185541
## 298 0.000000000000001110223 0.000000000000001110223 0.0000000000004185541
## 300 0.000000000000001110223 0.000000000000001110223 0.0000000000004185541
## 301 0.000000000000030198066 0.000000000000030198066 0.0000000000112034826
## 305 0.000000000000030198066 0.000000000000030198066 0.0000000000112034826
## 310 0.000000000000030198066 0.000000000000030198066 0.0000000000112034826
## 311 0.000000000000030198066 0.000000000000030198066 0.0000000000112034826
## 316 0.000000000001198374733 0.000000000001198374733 0.0000000003774880408
## 321 0.000000000001198374733 0.000000000001198374733 0.0000000003774880408
## 325 0.000000000001198374733 0.000000000001198374733 0.0000000003774880408
## 329 0.000000000001198374733 0.000000000001198374733 0.0000000003774880408
## 332 0.000000000001198374733 0.000000000001198374733 0.0000000003774880408
## 336 0.000000000001198374733 0.000000000001198374733 0.0000000003774880408
## 338 0.000000000001198374733 0.000000000001198374733 0.0000000003774880408
## 342 0.000000000001198374733 0.000000000001198374733 0.0000000003774880408
## 346 0.000000000000000000000 0.000000000000000000000 0.0000000000000000000
## 348 0.000000000000000000000 0.000000000000000000000 0.0000000000000000000
## 354 0.000000000021112445125 0.000000000021112445125 0.0000000060381593059
## 358 0.000000000021112445125 0.000000000021112445125 0.0000000060381593059
## 362 0.000000000000000000000 0.000000000000000000000 0.0000000000000000000
## 368 0.000000000000000000000 0.000000000000000000000 0.0000000000000000000
## 374 0.000000000000000000000 0.000000000000000000000 0.0000000000000000000
## 375 0.000000000000000000000 0.000000000000000000000 0.0000000000000000000
## 379 0.000000000000000000000 0.000000000000000000000 0.0000000000000000000
## 387 0.000000000000000000000 0.000000000000000000000 0.0000000000000000000
## 388 0.000000000000000000000 0.000000000000000000000 0.0000000000000000000
## 391 0.000000000000000000000 0.000000000000000000000 0.0000000000000000000
## 393 0.000000000000000000000 0.000000000000000000000 0.0000000000000000000
## 395 0.000000000000000000000 0.000000000000000000000 0.0000000000000000000
## 398 0.000000000000000000000 0.000000000000000000000 0.0000000000000000000
## 399 0.000000000000000000000 0.000000000000000000000 0.0000000000000000000
## 402 0.000000000000000000000 0.000000000000000000000 0.0000000000000000000
## 403 0.000000000000000000000 0.000000000000000000000 0.0000000000000000000
## 405 0.000000000000000000000 0.000000000000000000000 0.0000000000000000000
##     out_flag
## 6    OUTLIER
## 9    OUTLIER
## 10   OUTLIER
## 11   OUTLIER
## 18   OUTLIER
## 21   OUTLIER
## 23   OUTLIER
## 24   OUTLIER
## 25   OUTLIER
## 26   OUTLIER
## 27   OUTLIER
## 28   OUTLIER
## 34   OUTLIER
## 36   OUTLIER
## 37   OUTLIER
## 38   OUTLIER
## 40   OUTLIER
## 52   OUTLIER
## 54   OUTLIER
## 55   OUTLIER
## 67   OUTLIER
## 68   OUTLIER
## 69   OUTLIER
## 70   OUTLIER
## 72   OUTLIER
## 76   OUTLIER
## 81   OUTLIER
## 83   OUTLIER
## 84   OUTLIER
## 85   OUTLIER
## 86   OUTLIER
## 87   OUTLIER
## 89   OUTLIER
## 90   OUTLIER
## 94   OUTLIER
## 96   OUTLIER
## 103  OUTLIER
## 104  OUTLIER
## 105  OUTLIER
## 108  OUTLIER
## 111  OUTLIER
## 116  OUTLIER
## 119  OUTLIER
## 124  OUTLIER
## 126  OUTLIER
## 129  OUTLIER
## 134  OUTLIER
## 135  OUTLIER
## 141  OUTLIER
## 142  OUTLIER
## 144  OUTLIER
## 146  OUTLIER
## 147  OUTLIER
## 156  OUTLIER
## 158  OUTLIER
## 160  OUTLIER
## 162  OUTLIER
## 163  OUTLIER
## 171  OUTLIER
## 175  OUTLIER
## 176  OUTLIER
## 177  OUTLIER
## 183  OUTLIER
## 185  OUTLIER
## 186  OUTLIER
## 189  OUTLIER
## 191  OUTLIER
## 192  OUTLIER
## 195  OUTLIER
## 204  OUTLIER
## 206  OUTLIER
## 208  OUTLIER
## 213  OUTLIER
## 223  OUTLIER
## 225  OUTLIER
## 231  OUTLIER
## 234  OUTLIER
## 235  OUTLIER
## 236  OUTLIER
## 243  OUTLIER
## 244  OUTLIER
## 246  OUTLIER
## 248  OUTLIER
## 250  OUTLIER
## 253  OUTLIER
## 255  OUTLIER
## 257  OUTLIER
## 269  OUTLIER
## 270  OUTLIER
## 281  OUTLIER
## 282  OUTLIER
## 285  OUTLIER
## 296  OUTLIER
## 298  OUTLIER
## 300  OUTLIER
## 301  OUTLIER
## 305  OUTLIER
## 310  OUTLIER
## 311  OUTLIER
## 316  OUTLIER
## 321  OUTLIER
## 325  OUTLIER
## 329  OUTLIER
## 332  OUTLIER
## 336  OUTLIER
## 338  OUTLIER
## 342  OUTLIER
## 346  OUTLIER
## 348  OUTLIER
## 354  OUTLIER
## 358  OUTLIER
## 362  OUTLIER
## 368  OUTLIER
## 374  OUTLIER
## 375  OUTLIER
## 379  OUTLIER
## 387  OUTLIER
## 388  OUTLIER
## 391  OUTLIER
## 393  OUTLIER
## 395  OUTLIER
## 398  OUTLIER
## 399  OUTLIER
## 402  OUTLIER
## 403  OUTLIER
## 405  OUTLIER

model <- rmout$data$clean %>% 
  aov(formula = lmd, .)

anova(model)
## Analysis of Variance Table
## 
## Response: cifmf
##                Df Sum Sq Mean Sq                       F value
## composts        2 1.5872 0.79358 13798771145988843021802240660
## biol            2 1.6520 0.82599 14362199539619202704044242464
## composts:biol   4 3.4544 0.86360 15016274787197207858626608666
## Residuals     270 0.0000 0.00000                              
##                              Pr(>F)    
## composts      < 0.00000000000000022 ***
## biol          < 0.00000000000000022 ***
## composts:biol < 0.00000000000000022 ***
## Residuals                              
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

mc <- emmeans(model, ~ biol|composts) %>%
  cld(Letters = letters, reversed = T) %>%
  mutate(across(.group, trimws)) %>% 
  rename(group = ".group")

mc %>% kable()
biol composts emmean SE df lower.CL upper.CL group
1 5 0 2.0 0 270 2.0 2.0 a
3 10 0 2.0 0 270 2.0 2.0 a
2 0 0 2.0 0 270 2.0 2.0 a
4 10 5 2.0 0 270 2.0 2.0 a
5 5 5 2.0 0 270 2.0 2.0 a
6 0 5 2.0 0 270 2.0 2.0 a
7 10 15 2.5 0 270 2.5 2.5 a
8 5 15 2.0 0 270 2.0 2.0 b
9 0 15 2.0 0 270 2.0 2.0 b

p1b <- mc %>% 
  plot_smr(x = "composts"
           , y = "emmean"
           , group = "biol"
           , sig = "group"
           , error = "SE"
           , color = T
           , xlab = "Composts"
           , ylab = "Internal fruit color at physiological maturity"
           , ylimits = c(0, 3, 1)
           )

p1b

4.1.3 Fruit pH at physiological maturity (FpHPM)

trait <- "phfmf"
fb <- fisio

lmm <- paste({{trait}}, "~ 1 + (1|repetition) + composts*biol") %>% as.formula()

lmd <- paste({{trait}}, "~ composts*biol") %>% as.formula()

rmout <- fb %>% 
  remove_outliers(formula = lmm
                  , drop_na = T, plot_diag = T)

rmout$diagplot


rmout$outliers
##     index repetition composts biol    phfmf      resi res_MAD  rawp.BHStud
## 390   390          2       15   10 3.507795 0.7353291 3.98034 0.0000688167
##             adjp      bholm out_flag
## 390 0.0000688167 0.02787076  OUTLIER

model <- rmout$data$clean %>% 
  aov(formula = lmd, .)

anova(model)
## Analysis of Variance Table
## 
## Response: phfmf
##                Df  Sum Sq Mean Sq F value        Pr(>F)    
## composts        2  0.8058 0.40290 12.1492 0.00000757832 ***
## biol            2  1.2013 0.60065 18.1126 0.00000002978 ***
## composts:biol   4  0.5173 0.12932  3.8996      0.004051 ** 
## Residuals     395 13.0991 0.03316                          
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

mc <- emmeans(model, ~ biol|composts) %>%
  cld(Letters = letters, reversed = T) %>%
  mutate(across(.group, trimws)) %>% 
  rename(group = ".group")

mc %>% kable()
biol composts emmean SE df lower.CL upper.CL group
2 10 0 2.711098 0.0271466 395 2.657728 2.764468 a
1 0 0 2.594716 0.0271466 395 2.541346 2.648086 b
3 5 0 2.526739 0.0271466 395 2.473369 2.580109 b
4 10 5 2.737604 0.0271466 395 2.684234 2.790974 a
5 5 5 2.634018 0.0271466 395 2.580648 2.687388 b
6 0 5 2.540791 0.0271466 395 2.487421 2.594161 c
7 10 15 2.745579 0.0274534 395 2.691606 2.799552 a
8 5 15 2.710735 0.0271466 395 2.657365 2.764104 a
9 0 15 2.692818 0.0271466 395 2.639448 2.746188 a

p1c <- mc %>% 
  plot_smr(x = "composts"
           , y = "emmean"
           , group = "biol"
           , sig = "group"
           , error = "SE"
           , color = T
           , xlab = "Composts"
           , ylab = "pH del Fruto"
           , ylimits = c(0, 4, 1)
           )

p1c

4.1.4 Soluble solids content of the fruit at physiological maturity (SSCFPM)

trait <- "ssfmf"
fb <- fisio

lmm <- paste({{trait}}, "~ 1 + (1|repetition) + composts*biol") %>% as.formula()

lmd <- paste({{trait}}, "~ composts*biol") %>% as.formula()

rmout <- fb %>% 
  remove_outliers(formula = lmm
                  , drop_na = T, plot_diag = T)

rmout$diagplot


rmout$outliers
##     index repetition composts biol ssfmf     resi  res_MAD    rawp.BHStud
## 390   390          2       15   10  12.1 2.787154 4.673809 0.000002956642
##               adjp      bholm out_flag
## 390 0.000002956642 0.00119744  OUTLIER

model <- rmout$data$clean %>% 
  aov(formula = lmd, .)

anova(model)
## Analysis of Variance Table
## 
## Response: ssfmf
##                Df  Sum Sq Mean Sq F value         Pr(>F)    
## composts        2  10.124  5.0620 13.9979 0.000001338318 ***
## biol            2  14.392  7.1959 19.8987 0.000000005838 ***
## composts:biol   4   4.753  1.1882  3.2858        0.01146 *  
## Residuals     395 142.842  0.3616                           
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

mc <- emmeans(model, ~ biol|composts) %>%
  cld(Letters = letters, reversed = T) %>%
  mutate(across(.group, trimws)) %>% 
  rename(group = ".group")

mc %>% kable()
biol composts emmean SE df lower.CL upper.CL group
1 10 0 9.194444 0.0896445 395 9.018204 9.370684 a
2 5 0 8.767778 0.0896445 395 8.591538 8.944018 b
3 0 0 8.574444 0.0896445 395 8.398205 8.750684 b
4 10 5 9.291111 0.0896445 395 9.114871 9.467351 a
5 5 5 8.913333 0.0896445 395 8.737093 9.089573 b
6 0 5 8.646667 0.0896445 395 8.470427 8.822907 b
7 5 15 9.293333 0.0896445 395 9.117093 9.469573 a
9 10 15 9.244318 0.0906575 395 9.066087 9.422550 a
8 0 15 9.127778 0.0896445 395 8.951538 9.304018 a

p1d <- mc %>% 
  plot_smr(x = "composts"
           , y = "emmean"
           , group = "biol"
           , sig = "group"
           , error = "SE"
           , color = T
           , xlab = "Composts"
           , ylab = "Soluble solids content of the fruit at physiological maturity (brix^{o})"
           , ylimits = c(0, 12, 2)
           )

p1d

4.1.5 Titratable acidity of the fruit at physiological maturity (TAFPM)

trait <- "atfmf"
fb <- fisio

lmm <- paste({{trait}}, "~ 1 + (1|repetition) + composts*biol") %>% as.formula()

lmd <- paste({{trait}}, "~ composts*biol") %>% as.formula()

rmout <- fb %>% 
  remove_outliers(formula = lmm
                  , drop_na = T, plot_diag = T)

rmout$diagplot


rmout$outliers
##  [1] index       repetition  composts    biol        atfmf       resi       
##  [7] res_MAD     rawp.BHStud adjp        bholm       out_flag   
## <0 rows> (o 0- extensión row.names)

model <- rmout$data$clean %>% 
  aov(formula = lmd, .)

anova(model)
## Analysis of Variance Table
## 
## Response: atfmf
##                Df  Sum Sq  Mean Sq F value        Pr(>F)    
## composts        2 0.19915 0.099574 15.5979 0.00000030165 ***
## biol            2 0.23570 0.117851 18.4609 0.00000002161 ***
## composts:biol   4 0.08017 0.020043  3.1397       0.01465 *  
## Residuals     396 2.52799 0.006384                          
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

mc <- emmeans(model, ~ biol|composts) %>%
  cld(Letters = letters, reversed = T) %>%
  mutate(across(.group, trimws)) %>% 
  rename(group = ".group")

mc %>% kable()
biol composts emmean SE df lower.CL upper.CL group
3 0 0 1.365333 0.0119106 396 1.341917 1.388749 a
2 5 0 1.313556 0.0119106 396 1.290140 1.336971 b
1 10 0 1.260444 0.0119106 396 1.237029 1.283860 c
6 5 5 1.301556 0.0119106 396 1.278140 1.324971 a
4 0 5 1.298000 0.0119106 396 1.274584 1.321416 a
5 10 5 1.270889 0.0119106 396 1.247473 1.294305 a
9 0 15 1.278000 0.0119106 396 1.254584 1.301416 a
8 5 15 1.263889 0.0119106 396 1.240473 1.287305 ab
7 10 15 1.235111 0.0119106 396 1.211695 1.258527 b

p1e <- mc %>% 
  plot_smr(x = "composts"
           , y = "emmean"
           , group = "biol"
           , sig = "group"
           , error = "SE"
           , color = T
           , xlab = "Composts"
           , ylab = "Titratable acidity of the fruit at physiological maturity ('%')"
           , ylimits = c(0, 2, 1)
           )

p1e

4.1.6 Fruit dry matter percentage at physiological maturity (FDMPPM)

trait <- "msfmf"
fb <- fisio

lmm <- paste({{trait}}, "~ 1 + (1|repetition) + composts*biol") %>% as.formula()

lmd <- paste({{trait}}, "~ composts*biol") %>% as.formula()

rmout <- fb %>% 
  remove_outliers(formula = lmm
                  , drop_na = T, plot_diag = T)

rmout$diagplot


rmout$outliers
##  [1] index       repetition  composts    biol        msfmf       resi       
##  [7] res_MAD     rawp.BHStud adjp        bholm       out_flag   
## <0 rows> (o 0- extensión row.names)

model <- rmout$data$clean %>% 
  aov(formula = lmd, .)

anova(model)
## Analysis of Variance Table
## 
## Response: msfmf
##                Df  Sum Sq Mean Sq F value                Pr(>F)    
## composts        2  45.336  22.668 30.4208    0.0000000000005129 ***
## biol            2  72.171  36.085 48.4270 < 0.00000000000000022 ***
## composts:biol   4   6.782   1.695  2.2753               0.06058 .  
## Residuals     396 295.079   0.745                                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

mc <- emmeans(model, ~ biol|composts) %>%
  cld(Letters = letters, reversed = T) %>%
  mutate(across(.group, trimws)) %>% 
  rename(group = ".group")

mc %>% kable()
biol composts emmean SE df lower.CL upper.CL group
10 0 20.02778 0.1286813 396 19.77479 20.28076 a
5 0 19.31778 0.1286813 396 19.06479 19.57076 b
0 0 19.26889 0.1286813 396 19.01590 19.52187 b
10 5 20.00222 0.1286813 396 19.74924 20.25521 a
5 5 19.55744 0.1286813 396 19.30446 19.81043 b
0 5 19.07333 0.1286813 396 18.82035 19.32632 c
10 15 20.96133 0.1286813 396 20.70835 21.21432 a
5 15 20.21600 0.1286813 396 19.96302 20.46898 b
0 15 19.57556 0.1286813 396 19.32257 19.82854 c

p1f <- mc %>% 
  plot_smr(x = "composts"
           , y = "emmean"
           , group = "biol"
           , sig = "group"
           , error = "SE"
           , color = T
           , xlab = "Composts"
           , ylab = "Fruit dry matter at physiological maturity ('%')"
           , ylimits = c(0, 25, 5)
           )

p1f

4.1.7 Figure 1

Univariate analysis of the most critical variables for determining the physiological maturity of the fruit at harvest time and for preventing handling damage during commercialization or industrial processes.

legend <- cowplot::get_plot_component(p1a, 'guide-box-top', return_all = TRUE)

p1 <- list(p1a + labs(x = NULL) + theme(legend.position="none"
                                        , axis.title.x=element_blank()
                                        , axis.text.x=element_blank()
                                        , axis.ticks.x=element_blank())
           # , p1b + labs(x = NULL) + theme(legend.position="none"
           #                              , axis.title.x=element_blank()
           #                              , axis.text.x=element_blank()
           #                              , axis.ticks.x=element_blank())
           # , p1c + labs(x = NULL) + theme(legend.position="none"
           #                              , axis.title.x=element_blank()
           #                              , axis.text.x=element_blank()
           #                              , axis.ticks.x=element_blank())
           , p1d + labs(x = NULL) + theme(legend.position="none"
                                        , axis.title.x=element_blank()
                                        , axis.text.x=element_blank()
                                        , axis.ticks.x=element_blank())
           , p1e + theme(legend.position="none")
           , p1f + theme(legend.position="none")
           ) %>% 
  plot_grid(plotlist = ., ncol = 2
            , labels = "auto"
            ) 

fig <- plot_grid(legend, p1, ncol = 1, align = 'v', rel_heights = c(0.05, 1))
  
fig %>% 
  ggsave2(plot = ., "files/Fig-1.jpg"
         , units = "cm"
         , width = 25
         , height = 27
         )

fig %>% 
  ggsave2(plot = ., "files/Fig-1.eps"
         , units = "cm"
         , width = 25
         , height = 27
         )

knitr::include_graphics("files/Fig-1.jpg")

4.1.8 Multivariate analysis

Principal Component Analysis (PCA) of quality characteristics to correlate with mango fruits at physiological maturity from compost and biol applications.

mv <- fisio %>% 
  group_by(composts, biol) %>% 
  summarise(across(where(is.numeric), ~ mean(., na.rm = T))) %>%   
  unite("treat", composts:biol, sep = "-") %>% 
  rename(Treat = treat
         ,PFCCPM = pcfmf
         ,FFPM = ffmf
         ,IFCPM = cifmf
         ,SSCFPM = ssfmf
         ,FpHPM = phfmf
         ,TAFPM = atfmf
         ,FDMPPM = msfmf
         ,FPMI = imf
         ,RPP = rpp)
   
pca <- mv %>% 
  PCA(scale.unit = T, quali.sup = 1, graph = F) 

# summary

summary(pca, nbelements = Inf, nb.dec = 2)
## 
## Call:
## PCA(X = ., scale.unit = T, quali.sup = 1, graph = F) 
## 
## 
## Eigenvalues
##                       Dim.1  Dim.2  Dim.3  Dim.4  Dim.5  Dim.6  Dim.7  Dim.8
## Variance               7.14   0.92   0.52   0.30   0.10   0.02   0.01   0.00
## % of var.             79.29  10.27   5.74   3.28   1.11   0.21   0.10   0.01
## Cumulative % of var.  79.29  89.56  95.30  98.58  99.69  99.89  99.99 100.00
## 
## Individuals
##           Dist   Dim.1   ctr  cos2   Dim.2   ctr  cos2   Dim.3   ctr  cos2  
## 1      |  4.39 | -4.14 26.70  0.89 |  0.91  9.94  0.04 | -0.02  0.01  0.00 |
## 2      |  2.85 | -2.46  9.45  0.75 |  0.60  4.36  0.04 | -0.94 18.96  0.11 |
## 3      |  1.94 |  1.03  1.66  0.28 | -0.67  5.42  0.12 | -1.41 42.81  0.53 |
## 4      |  3.09 | -2.82 12.40  0.83 |  0.06  0.04  0.00 |  0.87 16.47  0.08 |
## 5      |  0.98 | -0.79  0.98  0.66 | -0.20  0.47  0.04 |  0.32  2.18  0.11 |
## 6      |  2.04 |  1.64  4.19  0.65 | -1.13 15.46  0.31 | -0.20  0.89  0.01 |
## 7      |  1.35 |  0.50  0.38  0.14 | -0.88  9.25  0.42 |  0.85 15.42  0.39 |
## 8      |  2.36 |  2.19  7.47  0.86 | -0.71  6.07  0.09 |  0.34  2.43  0.02 |
## 9      |  5.27 |  4.86 36.77  0.85 |  2.02 48.98  0.15 |  0.20  0.83  0.00 |
## 
## Variables
##          Dim.1   ctr  cos2   Dim.2   ctr  cos2   Dim.3   ctr  cos2  
## PFCCPM |  0.96 12.91  0.92 | -0.04  0.18  0.00 | -0.11  2.41  0.01 |
## FFPM   |  0.97 13.27  0.95 |  0.17  3.23  0.03 | -0.12  2.91  0.02 |
## IFCPM  |  0.57  4.59  0.33 |  0.81 71.60  0.66 |  0.07  0.95  0.00 |
## SSCFPM |  0.95 12.55  0.90 | -0.29  9.06  0.08 | -0.10  1.89  0.01 |
## FpHPM  |  0.90 11.35  0.81 | -0.17  3.25  0.03 | -0.02  0.06  0.00 |
## TAFPM  | -0.93 12.00  0.86 |  0.13  1.88  0.02 |  0.01  0.03  0.00 |
## FDMPPM |  0.95 12.62  0.90 |  0.23  5.63  0.05 | -0.12  2.84  0.01 |
## FPMI   |  0.97 13.20  0.94 | -0.20  4.29  0.04 | -0.07  1.05  0.01 |
## RPP    |  0.73  7.51  0.54 | -0.09  0.88  0.01 |  0.67 87.86  0.45 |
## 
## Supplementary categories
##           Dist   Dim.1  cos2 v.test   Dim.2  cos2 v.test   Dim.3  cos2 v.test  
## 0-0    |  4.39 | -4.14  0.89  -1.55 |  0.91  0.04   0.95 | -0.02  0.00  -0.03 |
## 0-10   |  1.94 |  1.03  0.28   0.39 | -0.67  0.12  -0.70 | -1.41  0.53  -1.96 |
## 0-5    |  2.85 | -2.46  0.75  -0.92 |  0.60  0.04   0.63 | -0.94  0.11  -1.31 |
## 15-0   |  1.35 |  0.50  0.14   0.19 | -0.88  0.42  -0.91 |  0.85  0.39   1.18 |
## 15-10  |  5.27 |  4.86  0.85   1.82 |  2.02  0.15   2.10 |  0.20  0.00   0.27 |
## 15-5   |  2.36 |  2.19  0.86   0.82 | -0.71  0.09  -0.74 |  0.34  0.02   0.47 |
## 5-0    |  3.09 | -2.82  0.83  -1.06 |  0.06  0.00   0.06 |  0.87  0.08   1.22 |
## 5-10   |  2.04 |  1.64  0.65   0.61 | -1.13  0.31  -1.18 | -0.20  0.01  -0.28 |
## 5-5    |  0.98 | -0.79  0.66  -0.30 | -0.20  0.04  -0.21 |  0.32  0.11   0.44 |


f2a <- plot.PCA(x = pca, choix = "var"
                , cex=0.8
                )

f2b <- plot.PCA(x = pca, choix = "ind"
                , habillage = 1
                , invisible = c("ind")
                , cex=0.8
                , ylim = c(-3,3)
                ) 

4.1.9 Figure 2

Principal Component Analysis (PCA).

fig <- list(f2a, f2b) %>% 
  plot_grid(plotlist = ., ncol = 2, nrow = 1
            , labels = "auto"
            , rel_widths = c(1, 1.5)
            )
fig %>% 
  ggsave2(plot = ., "files/Fig-2.jpg", units = "cm"
         , width = 25
         , height = 10
         )
fig %>% 
  ggsave2(plot = ., "files/Fig-2.eps", units = "cm"
         , width = 25
         , height = 10
         )

knitr::include_graphics("files/Fig-2.jpg")

4.1.10 Supplementary Figure 1

Results of the contributions and correlation of the variables in the Principal Component Analysis (PCA).

var <- get_pca_var(pca)

tmp <- tempfile(fileext = ".png")
ppi <- 300
png(tmp, width=8*ppi, height=10*ppi, res=ppi)
corrplot(var$cor, 
         method="number",
         tl.col="black", 
         tl.srt=45,)
graphics.off()

pt1 <- png::readPNG(tmp) %>%
  grid::rasterGrob(interpolate = TRUE)

pt2 <- fviz_eig(pca, 
                addlabels=TRUE,
                hjust = 0.05,
                barfill="white",
                barcolor ="darkblue",
                linecolor ="red") + 
  ylim(0, 90) + 
  labs(
    title = "PCA - percentage of explained variances",
    y = "Variance (%)") +
  theme_minimal()

pt3 <- fviz_contrib(pca,
                     choice = "var", 
                     axes = 1, 
                     top = 10,
                     fill="white",
                     color ="darkblue",
                     sort.val = "desc") +
  ylim(0, 15) + 
  labs(title = "Dim 1 - variables contribution") 

pt4 <- fviz_contrib(pca,
                     choice = "var", 
                     axes = 2, 
                     top = 10,
                     fill="white",
                     color ="darkblue",
                     sort.val = "desc") +
  ylim(0, 80) + 
  labs(title = "Dim 2 - variables contribution") 

plot <- ggdraw(xlim = c(0.0, 1.0), ylim = c(0, 1.0))+
  draw_plot(pt1,  width = 0.4, height = 0.99, x = 0.62, y = 0.0) +  
  draw_plot(pt2,  width = 0.6, height = 0.34, x = 0.03, y = 0.66) +
  draw_plot(pt3, width = 0.6, height = 0.34, x = 0.03, y = 0.33) + 
  draw_plot(pt4, width = 0.6, height = 0.34, x = 0.03, y = 0.0) +
        draw_plot_label(
    label = c("a", "b", "c", "d"),
    x = c(0.005, 0.005, 0.005, 0.65),
    y = c(0.999, 0.67, 0.34, 0.999))

ggsave2(plot = plot, "files/FigS1.jpg", height = 25, width = 40, units = "cm")

ggsave2(plot = plot, "files/FigS1.eps", height = 25, width = 40, units = "cm")

knitr::include_graphics("files/FigS1.jpg")

4.2 Specific Objective 2

Demonstrate the effect of organic fertilizers, specifically compost and biol, applied at the soil and foliar levels on the quality of mango fruit at commercial maturity.

4.2.1 Fruit firmness at commercial maturity (FFCM)

trait <- "ffmc"
cs <- consumo

lmm <- paste({{trait}}, "~ 1 + (1|repetition) + composts*biol") %>% as.formula()

lmd <- paste({{trait}}, "~ composts*biol") %>% as.formula()

rmout <- cs %>% 
  remove_outliers(formula = lmm
                  , drop_na = T, plot_diag = T)

rmout$diagplot


rmout$outliers
##  [1] index       repetition  composts    biol        ffmc        resi       
##  [7] res_MAD     rawp.BHStud adjp        bholm       out_flag   
## <0 rows> (o 0- extensión row.names)

model <- rmout$data$clean %>% 
  aov(formula = lmd, .)

anova(model)
## Analysis of Variance Table
## 
## Response: ffmc
##                Df  Sum Sq Mean Sq F value         Pr(>F)    
## composts        2  6.6441  3.3221 25.4488 0.000000000521 ***
## biol            2  2.7739  1.3870 10.6248 0.000054440296 ***
## composts:biol   4  1.4536  0.3634  2.7839        0.02947 *  
## Residuals     126 16.4480  0.1305                           
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

mc <- emmeans(model, ~ biol|composts) %>%
  cld(Letters = letters, reversed = T) %>%
  mutate(across(.group, trimws)) %>% 
  rename(group = ".group")

mc %>% kable()
biol composts emmean SE df lower.CL upper.CL group
2 10 0 4.053333 0.093288 126 3.868719 4.237947 a
1 0 0 3.546667 0.093288 126 3.362052 3.731281 b
3 5 0 3.440000 0.093288 126 3.255386 3.624614 b
4 10 5 4.093333 0.093288 126 3.908719 4.277947 a
5 5 5 4.040000 0.093288 126 3.855386 4.224614 a
6 0 5 3.813333 0.093288 126 3.628719 3.997947 a
7 10 15 4.333333 0.093288 126 4.148719 4.517948 a
8 5 15 4.213333 0.093288 126 4.028719 4.397947 a
9 0 15 4.120000 0.093288 126 3.935386 4.304614 a

p2a <- mc %>% 
  plot_smr(x = "composts"
           , y = "emmean"
           , group = "biol"
           , sig = "group"
           , error = "SE"
           , color = T
           , xlab = "Composts"
           , ylab = "Fruit firmness at commercial maturity (kgf.cm^{-2})"
           , glab = "Biol"
           , ylimits = c(0, 6, 2)
           )

p2a

4.2.2 Soluble solids content of the fruit at commercial maturity (SSCFCM)

trait <- "ssfmc"
cs <- consumo

lmm <- paste({{trait}}, "~ 1 + (1|repetition) + composts*biol") %>% as.formula()

lmd <- paste({{trait}}, "~ composts*biol") %>% as.formula()

rmout <- cs %>% 
  remove_outliers(formula = lmm
                  , drop_na = T, plot_diag = T)

rmout$diagplot


rmout$outliers
##  [1] index       repetition  composts    biol        ssfmc       resi       
##  [7] res_MAD     rawp.BHStud adjp        bholm       out_flag   
## <0 rows> (o 0- extensión row.names)

model <- rmout$data$clean %>% 
  aov(formula = lmd, .)

anova(model)
## Analysis of Variance Table
## 
## Response: ssfmc
##                Df Sum Sq Mean Sq F value        Pr(>F)    
## composts        2 13.192  6.5961 19.7094 0.00000003569 ***
## biol            2  6.876  3.4379 10.2725 0.00007365188 ***
## composts:biol   4  0.332  0.0830  0.2479        0.9105    
## Residuals     126 42.168  0.3347                          
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

mc <- emmeans(model, ~ biol|composts) %>%
  cld(Letters = letters, reversed = T) %>%
  mutate(across(.group, trimws)) %>% 
  rename(group = ".group")

mc %>% kable()
biol composts emmean SE df lower.CL upper.CL group
10 0 15.44000 0.149369 126 15.14440 15.73560 a
5 0 15.04667 0.149369 126 14.75107 15.34226 ab
0 0 14.92667 0.149369 126 14.63107 15.22226 b
10 5 15.46667 0.149369 126 15.17107 15.76226 a
5 5 15.22000 0.149369 126 14.92440 15.51560 ab
0 5 14.84667 0.149369 126 14.55107 15.14226 b
10 15 16.12000 0.149369 126 15.82440 16.41560 a
5 15 15.72667 0.149369 126 15.43107 16.02226 ab
0 15 15.61333 0.149369 126 15.31774 15.90893 b

p2b <- mc %>% 
  plot_smr(x = "composts"
           , y = "emmean"
           , group = "biol"
           , sig = "group"
           , error = "SE"
           , color = T
           , xlab = "Composts"
           , ylab = "Soluble solids content of the fruit at commercial maturity (brix^{o})"
           , ylimits = c(0, 18, 3)
           )

p2b

4.2.3 Titratable acidity of the fruit at commercial maturity (TAFCM)

trait <- "atfmc"
cs <- consumo

lmm <- paste({{trait}}, "~ 1 + (1|repetition) + composts*biol") %>% as.formula()

lmd <- paste({{trait}}, "~ composts*biol") %>% as.formula()

rmout <- cs %>% 
  remove_outliers(formula = lmm
                  , drop_na = T, plot_diag = T)

rmout$diagplot


rmout$outliers
##    index repetition composts biol atfmc       resi   res_MAD   rawp.BHStud
## 4      4          1        0    0  0.50 -0.1157152 -4.533406 0.00000580400
## 5      5          1        0    0  0.50 -0.1157152 -4.533406 0.00000580400
## 18    18          1        5    0  0.74  0.1062848  4.163951 0.00003127878
## 27    27          3        5    0  0.50 -0.1006342 -3.942576 0.00008061124
##             adjp        bholm out_flag
## 4  0.00000580400 0.0007835399  OUTLIER
## 5  0.00000580400 0.0007835399  OUTLIER
## 18 0.00003127878 0.0041600772  OUTLIER
## 27 0.00008061124 0.0106406836  OUTLIER

model <- rmout$data$clean %>% 
  aov(formula = lmd, .)

anova(model)
## Analysis of Variance Table
## 
## Response: atfmc
##                Df   Sum Sq  Mean Sq F value                Pr(>F)    
## composts        2 0.219750 0.109875 94.7899 < 0.00000000000000022 ***
## biol            2 0.054531 0.027266 23.5222         0.00000000229 ***
## composts:biol   4 0.023460 0.005865  5.0598             0.0008311 ***
## Residuals     122 0.141416 0.001159                                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

mc <- emmeans(model, ~ biol|composts) %>%
  cld(Letters = letters, reversed = T) %>%
  mutate(across(.group, trimws)) %>% 
  rename(group = ".group")

mc %>% kable()
biol composts emmean SE df lower.CL upper.CL group
2 0 0 0.6169231 0.0094427 122 0.5982303 0.6356159 a
3 10 0 0.5946667 0.0087907 122 0.5772646 0.6120687 a
1 5 0 0.5940000 0.0087907 122 0.5765979 0.6114021 a
6 0 5 0.6192308 0.0094427 122 0.6005380 0.6379236 a
5 5 5 0.5496667 0.0087907 122 0.5322646 0.5670687 b
4 10 5 0.5346667 0.0087907 122 0.5172646 0.5520687 b
9 0 15 0.5193333 0.0087907 122 0.5019313 0.5367354 a
8 5 15 0.5138667 0.0087907 122 0.4964646 0.5312687 a
7 10 15 0.4746667 0.0087907 122 0.4572646 0.4920687 b

p2c <- mc %>% 
  plot_smr(x = "composts"
           , y = "emmean"
           , group = "biol"
           , sig = "group"
           , error = "SE"
           , color = T
           , xlab = "Composts"
           , ylab = "Titratable acidity of the fruit at commercial maturity ('%')"
           , ylimits = c(0, 0.8, 0.2)
           )

p2c

4.2.4 Fruit dehydration percentage at commercial maturity (FDPCM)

trait <- "pdfmc"
cs <- consumo

lmm <- paste({{trait}}, "~ 1 + (1|repetition) + composts*biol") %>% as.formula()

lmd <- paste({{trait}}, "~ composts*biol") %>% as.formula()

rmout <- cs %>% 
  remove_outliers(formula = lmm
                  , drop_na = T, plot_diag = T)

rmout$diagplot


rmout$outliers
##  [1] index       repetition  composts    biol        pdfmc       resi       
##  [7] res_MAD     rawp.BHStud adjp        bholm       out_flag   
## <0 rows> (o 0- extensión row.names)

model <- rmout$data$clean %>% 
  aov(formula = lmd, .)

anova(model)
## Analysis of Variance Table
## 
## Response: pdfmc
##                Df Sum Sq Mean Sq F value           Pr(>F)    
## composts        2 2.9454 1.47269 28.9546 0.00000000004501 ***
## biol            2 1.6263 0.81316 15.9875 0.00000064906170 ***
## composts:biol   4 0.2066 0.05164  1.0153           0.4022    
## Residuals     126 6.4086 0.05086                             
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

mc <- emmeans(model, ~ biol|composts) %>%
  cld(Letters = letters, reversed = T) %>%
  mutate(across(.group, trimws)) %>% 
  rename(group = ".group")

mc %>% kable()
biol composts emmean SE df lower.CL upper.CL group
3 0 0 6.760667 0.0582307 126 6.645430 6.875903 a
2 5 0 6.539333 0.0582307 126 6.424097 6.654570 b
1 10 0 6.408000 0.0582307 126 6.292763 6.523237 b
6 0 5 6.685333 0.0582307 126 6.570097 6.800570 a
5 5 5 6.492000 0.0582307 126 6.376763 6.607237 ab
4 10 5 6.375333 0.0582307 126 6.260097 6.490570 b
9 0 15 6.301333 0.0582307 126 6.186096 6.416570 a
8 5 15 6.236000 0.0582307 126 6.120763 6.351237 a
7 10 15 6.162667 0.0582307 126 6.047430 6.277903 a

p2d <- mc %>% 
  plot_smr(x = "composts"
           , y = "emmean"
           , group = "biol"
           , sig = "group"
           , error = "SE"
           , color = T
           , xlab = "Composts"
           , ylab = "Fruit dehydration at commercial maturity ('%')"
           , glab = "Biol"
           , ylimits = c(0, 8, 2)
           )

p2d

4.2.5 Fruit pH at commercial maturity (FpHCM)

trait <- "phfmc"
cs <- consumo

lmm <- paste({{trait}}, "~ 1 + (1|repetition) + composts*biol") %>% as.formula()

lmd <- paste({{trait}}, "~ composts*biol") %>% as.formula()

rmout <- cs %>% 
  remove_outliers(formula = lmm
                  , drop_na = T, plot_diag = T)

rmout$diagplot


rmout$outliers
##    index repetition composts biol phfmc       resi   res_MAD   rawp.BHStud
## 27    27          3        5    0   3.8 -0.4029042 -4.421673 0.00000979398
##             adjp       bholm out_flag
## 27 0.00000979398 0.001322187  OUTLIER

model <- rmout$data$clean %>% 
  aov(formula = lmd, .)

anova(model)
## Analysis of Variance Table
## 
## Response: phfmc
##                Df  Sum Sq Mean Sq F value                Pr(>F)    
## composts        2 1.51062 0.75531 54.8131 < 0.00000000000000022 ***
## biol            2 0.64152 0.32076 23.2776         0.00000000255 ***
## composts:biol   4 0.26493 0.06623  4.8065              0.001221 ** 
## Residuals     125 1.72246 0.01378                                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

mc <- emmeans(model, ~ biol|composts) %>%
  cld(Letters = letters, reversed = T) %>%
  mutate(across(.group, trimws)) %>% 
  rename(group = ".group")

mc %>% kable()
biol composts emmean SE df lower.CL upper.CL group
10 0 4.388000 0.0303092 125 4.328014 4.447986 a
5 0 4.369333 0.0303092 125 4.309348 4.429319 a
0 0 4.332000 0.0303092 125 4.272014 4.391986 a
10 5 4.484000 0.0303092 125 4.424014 4.543986 a
5 5 4.429333 0.0303092 125 4.369348 4.489319 a
0 5 4.201429 0.0313730 125 4.139337 4.263520 b
10 15 4.692667 0.0303092 125 4.632681 4.752652 a
5 15 4.568667 0.0303092 125 4.508681 4.628652 b
0 15 4.520000 0.0303092 125 4.460014 4.579986 b

p2e <- mc %>% 
  plot_smr(x = "composts"
           , y = "emmean"
           , group = "biol"
           , sig = "group"
           , error = "SE"
           , color = T
           , xlab = "Composts"
           , ylab = "Fruit pH at commercial maturity"
           , ylimits = c(0, 6, 2)
           )

p2e

4.2.6 Internal fruit color at commercial maturity (IFCCM)

trait <- "cifmc"
cs <- consumo

lmm <- paste({{trait}}, "~ 1 + (1|repetition) + composts*biol") %>% as.formula()

lmd <- paste({{trait}}, "~ composts*biol") %>% as.formula()

rmout <- cs %>% 
  remove_outliers(formula = lmm
                  , drop_na = T, plot_diag = T)

rmout$diagplot


rmout$outliers
##  [1] index       repetition  composts    biol        cifmc       resi       
##  [7] res_MAD     rawp.BHStud adjp        bholm       out_flag   
## <0 rows> (o 0- extensión row.names)

model <- rmout$data$clean %>% 
  aov(formula = lmd, .)

anova(model)
## Analysis of Variance Table
## 
## Response: cifmc
##                Df  Sum Sq Mean Sq F value   Pr(>F)   
## composts        2  1.4890 0.74452  5.4384 0.005427 **
## biol            2  1.9690 0.98452  7.1915 0.001103 **
## composts:biol   4  2.0914 0.52285  3.8192 0.005776 **
## Residuals     126 17.2493 0.13690                    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

mc <- emmeans(model, ~ biol|composts) %>%
  cld(Letters = letters, reversed = T) %>%
  mutate(across(.group, trimws)) %>% 
  rename(group = ".group")

mc %>% kable()
biol composts emmean SE df lower.CL upper.CL group
10 0 3.766667 0.0955334 126 3.577609 3.955725 a
5 0 3.566667 0.0955334 126 3.377609 3.755724 a
0 0 3.066667 0.0955334 126 2.877609 3.255724 b
10 5 3.633333 0.0955334 126 3.444275 3.822391 a
5 5 3.633333 0.0955334 126 3.444275 3.822391 a
0 5 3.593333 0.0955334 126 3.404275 3.782391 a
10 15 3.800000 0.0955334 126 3.610942 3.989058 a
5 15 3.700000 0.0955334 126 3.510942 3.889058 a
0 15 3.666667 0.0955334 126 3.477609 3.855724 a

p2f <- mc %>% 
  plot_smr(x = "composts"
           , y = "emmean"
           , group = "biol"
           , sig = "group"
           , error = "SE"
           , color = T
           , xlab = "Composts"
           , ylab = "Internal fruit color at commercial maturity"
           , ylimits = c(0, 5, 1)
           )

p2f

4.2.7 Figure 3

Univariate analysis of the most crucial variables for determining the commercial maturity of the fruit in the postharvest handling process.

legend <- cowplot::get_plot_component(p2a, 'guide-box-top', return_all = TRUE)

p2 <- list(p2a + labs(x = NULL) + theme(legend.position="none"
                                        , axis.title.x=element_blank()
                                        , axis.text.x=element_blank()
                                        , axis.ticks.x=element_blank())
           , p2b + labs(x = NULL) + theme(legend.position="none"
                                        , axis.title.x=element_blank()
                                        , axis.text.x=element_blank()
                                        , axis.ticks.x=element_blank())
           , p2c + theme(legend.position="none")
           , p2d + theme(legend.position="none")
           # , p2e + theme(legend.position="none")
           # , p2f + theme(legend.position="none")
           ) %>% 
  plot_grid(plotlist = ., ncol = 2
            , labels = "auto"
            ) 

fig <- plot_grid(legend, p2, ncol = 1, align = 'v', rel_heights = c(0.05, 1))

fig %>% 
  ggsave2(plot = ., "files/Fig-3.jpg"
         , units = "cm"
         , width = 25
         , height = 27
         )

fig %>% 
  ggsave2(plot = ., "files/Fig-3.eps"
         , units = "cm"
         , width = 25
         , height = 27
         )

knitr::include_graphics("files/Fig-3.jpg")

4.2.8 Multivariate analysis

Principal Component Analysis (PCA) of quality characteristics to correlate with mango fruits at commercial maturity from compost and biol applications.

mv <- consumo %>% 
  group_by(composts, biol) %>% 
  summarise(across(where(is.numeric), ~ mean(., na.rm = T))) %>%   
  unite("treat", composts:biol, sep = "-") %>% 
  rename(Treat = treat
         ,FDPCM = pdfmc
         ,FFCM = ffmc
         ,IFCCM = cifmc
         ,SSCFCM = ssfmc
         ,FpHCM = phfmc
         ,TAFCM = atfmc
         ,FCMI = imf)
  
pca <- mv %>% 
  PCA(scale.unit = T, quali.sup = 1, graph = F) 

# summary

summary(pca, nbelements = Inf, nb.dec = 2)
## 
## Call:
## PCA(X = ., scale.unit = T, quali.sup = 1, graph = F) 
## 
## 
## Eigenvalues
##                       Dim.1  Dim.2  Dim.3  Dim.4  Dim.5  Dim.6  Dim.7
## Variance               5.94   0.72   0.22   0.08   0.03   0.01   0.00
## % of var.             84.79  10.35   3.12   1.10   0.46   0.18   0.01
## Cumulative % of var.  84.79  95.14  98.26  99.36  99.81  99.99 100.00
## 
## Individuals
##           Dist   Dim.1   ctr  cos2   Dim.2   ctr  cos2   Dim.3   ctr  cos2  
## 1      |  3.99 | -3.53 23.36  0.78 | -1.82 50.71  0.21 |  0.30  4.70  0.01 |
## 2      |  2.48 | -2.15  8.62  0.75 |  0.02  0.01  0.00 | -1.22 76.40  0.24 |
## 3      |  1.45 | -0.25  0.11  0.03 |  1.28 25.17  0.78 | -0.03  0.05  0.00 |
## 4      |  3.26 | -3.01 16.91  0.85 |  1.12 19.22  0.12 |  0.47 11.33  0.02 |
## 5      |  0.61 | -0.15  0.04  0.06 |  0.20  0.60  0.10 |  0.33  5.43  0.28 |
## 6      |  0.89 |  0.85  1.36  0.92 | -0.05  0.04  0.00 |  0.18  1.59  0.04 |
## 7      |  1.64 |  1.62  4.92  0.98 | -0.15  0.35  0.01 |  0.02  0.03  0.00 |
## 8      |  2.31 |  2.29  9.85  0.99 | -0.11  0.19  0.00 |  0.04  0.08  0.00 |
## 9      |  4.36 |  4.31 34.81  0.98 | -0.49  3.71  0.01 | -0.09  0.39  0.00 |
## 
## Variables
##          Dim.1   ctr  cos2   Dim.2   ctr  cos2   Dim.3   ctr  cos2  
## FDPCM  | -0.98 16.06  0.95 | -0.11  1.57  0.01 |  0.14  9.00  0.02 |
## FFCM   |  0.89 13.39  0.79 |  0.22  6.42  0.05 |  0.39 71.20  0.16 |
## IFCCM  |  0.71  8.50  0.50 |  0.68 64.34  0.47 | -0.15  9.80  0.02 |
## SSCFCM |  0.98 16.24  0.96 | -0.06  0.49  0.00 | -0.04  0.73  0.00 |
## FpHCM  |  0.94 14.82  0.88 | -0.30 12.42  0.09 | -0.14  8.48  0.02 |
## TAFCM  | -0.95 15.29  0.91 |  0.25  8.69  0.06 | -0.03  0.35  0.00 |
## FCMI   |  0.97 15.70  0.93 | -0.21  6.07  0.04 |  0.03  0.44  0.00 |
## 
## Supplementary categories
##           Dist   Dim.1  cos2 v.test   Dim.2  cos2 v.test   Dim.3  cos2 v.test  
## 0-0    |  3.99 | -3.53  0.78  -1.45 | -1.82  0.21  -2.14 |  0.30  0.01   0.65 |
## 0-10   |  1.45 | -0.25  0.03  -0.10 |  1.28  0.78   1.51 | -0.03  0.00  -0.07 |
## 0-5    |  2.48 | -2.15  0.75  -0.88 |  0.02  0.00   0.03 | -1.22  0.24  -2.62 |
## 15-0   |  1.64 |  1.62  0.98   0.67 | -0.15  0.01  -0.18 |  0.02  0.00   0.05 |
## 15-10  |  4.36 |  4.31  0.98   1.77 | -0.49  0.01  -0.58 | -0.09  0.00  -0.19 |
## 15-5   |  2.31 |  2.29  0.99   0.94 | -0.11  0.00  -0.13 |  0.04  0.00   0.08 |
## 5-0    |  3.26 | -3.01  0.85  -1.23 |  1.12  0.12   1.32 |  0.47  0.02   1.01 |
## 5-10   |  0.89 |  0.85  0.92   0.35 | -0.05  0.00  -0.06 |  0.18  0.04   0.38 |
## 5-5    |  0.61 | -0.15  0.06  -0.06 |  0.20  0.10   0.23 |  0.33  0.28   0.70 |


f4a <- plot.PCA(x = pca, choix = "var"
                , cex=0.8
                )

f4b <- plot.PCA(x = pca, choix = "ind"
                , habillage = 1
                , invisible = c("ind")
                , cex=0.8
                , ylim = c(-3,3)
                ) 

4.2.9 Figure 4

Principal Component Analysis (PCA).

fig <- list(f4a, f4b) %>% 
  plot_grid(plotlist = ., ncol = 2, nrow = 1
            , labels = "auto"
            , rel_widths = c(1, 1.5)
            )
fig %>% 
  ggsave2(plot = ., "files/Fig-4.jpg", units = "cm"
         , width = 25
         , height = 10
         )

fig %>% 
  ggsave2(plot = ., "files/Fig-4.eps", units = "cm"
         , width = 25
         , height = 10
         )

knitr::include_graphics("files/Fig-4.jpg")

4.2.10 Supplementary Figure 2

Results of the contributions and correlation of the variables in the Principal Component Analysis (PCA).

var <- get_pca_var(pca)

tmp <- tempfile(fileext = ".png")
ppi <- 300
png(tmp, width=8*ppi, height=8*ppi, res=ppi)
corrplot(var$cor, 
         method="number",
         tl.col="black", 
         tl.srt=45,)
graphics.off()

pt1 <- png::readPNG(tmp) %>%
  grid::rasterGrob(interpolate = TRUE)

pt2 <- fviz_eig(pca, 
                addlabels=TRUE,
                hjust = 0.05,
                barfill="white",
                barcolor ="darkblue",
                linecolor ="red") + 
  ylim(0, 100) + 
  labs(
    title = "PCA - percentage of explained variances",
    y = "Variance (%)") +
  theme_minimal()

pt3 <- fviz_contrib(pca,
                     choice = "var", 
                     axes = 1, 
                     top = 10,
                     fill="white",
                     color ="darkblue",
                     sort.val = "desc") +
  ylim(0, 20) + 
  labs(title = "Dim 1 - variables contribution") 

pt4 <- fviz_contrib(pca,
                     choice = "var", 
                     axes = 2, 
                     top = 10,
                     fill="white",
                     color ="darkblue",
                     sort.val = "desc") +
  ylim(0, 80) + 
  labs(title = "Dim 2 - variables contribution") 

plot <- ggdraw(xlim = c(0.0, 1.0), ylim = c(0, 1.0))+
  draw_plot(pt1,  width = 0.4, height = 0.99, x = 0.62, y = 0.0) +  
  draw_plot(pt2,  width = 0.6, height = 0.34, x = 0.03, y = 0.66) +
  draw_plot(pt3, width = 0.6, height = 0.34, x = 0.03, y = 0.33) + 
  draw_plot(pt4, width = 0.6, height = 0.34, x = 0.03, y = 0.0) +
        draw_plot_label(
    label = c("a", "b", "c", "d"),
    x = c(0.005, 0.005, 0.005, 0.65),
    y = c(0.999, 0.67, 0.34, 0.999))

ggsave2(plot = plot, "files/FigS2.jpg", height = 25, width = 40, units = "cm")

ggsave2(plot = plot, "files/FigS2.eps", height = 25, width = 40, units = "cm")

knitr::include_graphics("files/FigS2.jpg")

5 Meteorological data

Climatic conditions of the study area located in the Tambogrande district, Piura region.

met <- range_read(ss = gs, sheet = "clima") %>% 
  mutate(date = as_date(Fecha))

str(met)
## tibble [180 × 7] (S3: tbl_df/tbl/data.frame)
##  $ Fecha: POSIXct[1:180], format: "2022-09-01" "2022-09-02" ...
##  $ TMax : num [1:180] 29 31.4 33.8 31.9 33.1 33.8 31.5 31.3 29.8 31.8 ...
##  $ TMin : num [1:180] 14.8 14.1 14.8 16.2 16.8 15.6 16.1 15.8 15.4 15.4 ...
##  $ D. T : num [1:180] 14.2 17.3 19 15.7 16.3 18.2 15.4 15.5 14.4 16.4 ...
##  $ HR   : num [1:180] 70 69.1 65.1 66.7 64.6 67.3 68.2 67.9 70.2 71.4 ...
##  $ PP   : num [1:180] 0 0 0 0 0 0 0 0 0 0 ...
##  $ date : Date[1:180], format: "2022-09-01" "2022-09-02" ...
names(met)
## [1] "Fecha" "TMax"  "TMin"  "D. T"  "HR"    "PP"    "date"

max(met$PP)
## [1] 107.9

scale <- 3

plot <- met %>% 
  ggplot(aes(x = date)) +
  geom_line(aes(y = TMax, color = "Tmax (°C)"), size= 0.8) + 
  geom_line(aes(y = TMin, color = "Tmin (°C)"), size= 0.8) +
  geom_bar(aes(y = PP/scale)
            , stat="identity", size=.1, fill="blue", color="black", alpha=.4) +
  geom_line(aes(y = HR/scale, color = "HR (%)"), size = 0.8) +
  scale_color_manual("", values = c("skyblue", "red", "blue")) +
  scale_y_continuous(limits = c(0, 40)
                     , expand = c(0, 0)
                     , name = "Temperature (°C)"
                     , sec.axis = sec_axis(~ . * scale, name = "Precipitation (mm)")
                     ) +
  scale_x_date(date_breaks = "1 month", date_labels = "%m-%Y", name = NULL) +
  theme_minimal_grid() +
  theme(legend.position = "top")

plot %>% 
  ggsave2(plot = ., "files/weather.jpg", units = "cm"
         , width = 25, height = 15)

knitr::include_graphics("files/weather.jpg")